package cn.oms.manage.dao.persist.repository;


import cn.oms.commons.pojo.vo.PageData;
import cn.oms.manage.pojo.entity.Medicine;
import cn.oms.manage.pojo.vo.MedicineListVO;
import cn.oms.manage.pojo.vo.MedicineStandardVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IMedicineRepository {

    int insert(Medicine medicine);

    int deleteById(Long id);

    int update(Medicine medicine);

    MedicineStandardVO getStandardById(Long id);

    PageData<MedicineListVO> listByCategoryId(Long categoryId, Integer pageNum, Integer pageSize);

    int countByName(String name);

    int countByNameAndNotId(@Param("id") Long id, @Param("name") String name);
}
